<include file="__THEME__/user_header" />
<!--<script>
$(function(){
	$('.ask_type a').click(function(){
		$('#category_id').val($(this).attr('href'));
		$(this).addClass('on').blur().parent('li').siblings().find('a').removeClass('on');
		return false;
	});
});
</script>	-->
	<article class="app_widgets ask"> 
		<!-- ask start -->
		<div class="ask_form">
			<ul class="ask_type">
				<li><a href="<?php echo append_query(array('cid' => 0));?>" class="<?php if($_REQUEST['cid'] == 0):?>on<?php endif;?>">健康</a></li>
				<li><a href="<?php echo append_query(array('cid' => 1));?>" class="<?php if($_REQUEST['cid'] == 1):?>on<?php endif;?>">饮食</a></li>
				<li><a href="<?php echo append_query(array('cid' => 2));?>" class="<?php if($_REQUEST['cid'] == 2):?>on<?php endif;?>">教育</a></li>
				<li><a href="<?php echo append_query(array('cid' => 3));?>" class="<?php if($_REQUEST['cid'] == 3):?>on<?php endif;?>">亲子</a></li>
			</ul>
			<form class="ask_create_form" action="{:U('ask/index/ask')}" method="POST">
				<div class="simple_editor">
					<textarea name="content" id="ask_content" placeholder="问题描述，想问什么，起因，结果，想得到什么答案"></textarea>
					<input type="hidden" name="cid" id="category_id" value="<?php echo intval($_REQUEST['cid']);?>" />
				</div>
				<div class="settings">
					<ul class="buttons"> 
						<li style="margin-right:10px;"><a href="" class="button"><em class="icon icon_small_emotion">&nbsp;</em>表情</a></li>
						<li><a href="" class="button">我的财富</a></li>
						<li><a href="" class="button"><em class="icon hen">&nbsp;</em><?php echo $data['credit']['score']['credit'];?></a> = </li>
						<li><a href="" class="button"><em class="icon sheep">&nbsp;</em><?php echo intval($data['credit']['score']['credit']/500);?></a></li>
						<li class="pay"><span class="button">本问题悬赏 &nbsp;<input type="text" size="5" value="<?php if($data['credit']['score']['credit'] >= 50): echo 50; else: echo $data['credit']['score']['credit']; endif;?>" name="pay" /><em class="icon hen">&nbsp;</em></span></li>
						<li class="submit_button"><input type="submit" name="submit" value="提问" class="submit button_o3" /></li>
					</ul>
					
				</div>
			</form>
		</div>
		<!-- ask end -->
		
		<ul class="filter">
			<li class=""><a href="<?php echo append_query(array('sort' => 0));?>" class="<?php if($_REQUEST['sort'] == 0):?>on<?php endif;?>">最新</a></li>
			<li class=""><a href="<?php echo append_query(array('sort' => 1));?>" class="<?php if($_REQUEST['sort'] == 1):?>on<?php endif;?>">待解决</a></li>
			<li class=""><a href="<?php echo append_query(array('sort' => 5));?>" class="<?php if($_REQUEST['sort'] == 5):?>on<?php endif;?>">已解决</a></li>
			<li><a href="<?php echo append_query(array('sort' => 2));?>" class="<?php if($_REQUEST['sort'] == 2):?>on<?php endif;?>">给鸡最多少排序</a></li>
			<li class=""><a href="<?php echo append_query(array('sort' => 3));?>" class="<?php if($_REQUEST['sort'] == 3):?>on<?php endif;?>">我的</a></li>
			<li><a href="<?php echo append_query(array('sort' => 4));?>" class="<?php if($_REQUEST['sort'] == 4):?>on<?php endif;?>">我回答过的</a></li>
		</ul>
		
		<div class="askBox">
		{:W('AskList', array('mid'=>$mid, 'list'=>$data['list']))}
		</div>
		
		<!-- more -->
		<!--<a href="#" class="more"><em class="arrow_right_w icon">&nbsp;</em>更多</a>-->
		
	</article>
	
<include file="__THEME__/user_footer" />